package com.bootdo.member.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.member.dao.ShequUserAddressDao;
import com.bootdo.member.domain.ShequUserAddress;
import com.bootdo.member.service.ShequUserAddressService;



@Service
public class ShequUserAddressServiceImpl implements ShequUserAddressService {
	@Autowired
	private ShequUserAddressDao shequUserAddressDao;
	
	@Override
	public ShequUserAddress get(Long id){
		return shequUserAddressDao.get(id);
	}
	
	@Override
	public List<ShequUserAddress> list(Map<String, Object> map){
		return shequUserAddressDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return shequUserAddressDao.count(map);
	}
	
	@Override
	public int save(ShequUserAddress shequUserAddress){
	
		if(shequUserAddress.getId() != null) {
			return shequUserAddressDao.update(shequUserAddress);
		}else {
			return shequUserAddressDao.save(shequUserAddress);
		}		
	
		
	}
	
	@Override
	public int update(ShequUserAddress shequUserAddress){
		return shequUserAddressDao.update(shequUserAddress);
	}
	
	@Override
	public int remove(Long id){
		return shequUserAddressDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return shequUserAddressDao.batchRemove(ids);
	}

	@Override
	public int updateAllNotDefault(Long id,Long uid) {
		return shequUserAddressDao.updateAllNotDefault(id,uid);
	}

}
